C# get key by value Dict

39

C# get key by value Dict -

var myKey = myDict.FirstOrDefault(x => x.Value == "myValue").Key;
// return the first key finded in the dict associated to this value

Comments

Submit
0 Comments